import request from '@/utils/request'

// 查询排课基础信息列表
export function listSchedule(query) {
  return request({
    url: '/edu/schedule/list',
    method: 'get',
    params: query
  })
}

// 查询排课基础信息详细
export function getSchedule(scheduleId) {
  return request({
    url: '/edu/schedule/' + scheduleId,
    method: 'get'
  })
}

// 新增排课基础信息
export function addSchedule(data) {
  return request({
    url: '/edu/schedule',
    method: 'post',
    data: data
  })
}

// 修改排课基础信息
export function updateSchedule(data) {
  return request({
    url: '/edu/schedule',
    method: 'put',
    data: data
  })
}

// 删除排课基础信息
export function delSchedule(scheduleId) {
  return request({
    url: '/edu/schedule/' + scheduleId,
    method: 'delete'
  })
}

export function handleAutoSchedule(classId) {
  return request({
    url: '/edu/schedule/autoScheduling/' + classId,
    method: 'post',
  })
}

// 导出排课基础信息
export function exportSchedule(query) {
  return request({
    url: '/edu/schedule/export',
    method: 'get',
    params: query
  })
}